		<div class="ui-portlet">
			<ol class="breadcrumb">
			  <li><a href="/users/index"><i class="fa fa-home"></i>&nbsp;&nbsp;微信公众号</a></li>
			  <li class="active">完善公众号资料</li>
			</ol>  
		</div>         
       <hr>
<style>
body{
	overflow-x:hidden;
}
</style>
{{if $current_action == 'add'}}
<p class="text-right"><a class="btn btn-warning" target="_blank" href="{{$this->Html->url('/wxes/pauth')}}"><i class="fa fa-wechat"></i> 通过微信公众号授权一键添加公众号</a></p>
{{/if}}


{{$this->Form->create('Wx',array('class'=>'form-horizontal','role'=>'form'))}}
	<div class="form-group form-inline">
		<label class="col-sm-2 control-label" for="WxName">名称</label>
		<div class="col-sm-10 controls">
			{{$this->Form->hidden('id')}}
			{{$this->Form->input('name',array('class'=>'form-control','div'=>false,'label'=>false))}}
		</div>
	</div>
	<div class="form-group form-inline">
		<label class="col-sm-2 control-label" for="WxSlug">微信英文ID</label>
		<div class="col-sm-10 controls select">
			{{$this->Form->input('slug',array('class'=>'form-control','div'=>false,'label'=>false))}}
		</div>
	</div>
	<!-- <div class="form-group">
		<label class="col-sm-2 control-label" for="WxWxid">原始ID</label>
		<div class="col-sm-10 controls select">
			{{$this->Form->input('wxid',array('class'=>'form-control','div'=>false,'label'=>false))}}
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label" for="WxBiz">biz码</label>
		<div class="col-sm-10 controls select">
			{{$this->Form->input('biz',array('class'=>'form-control','div'=>false,'label'=>false))}}
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label" >分类</label>
		<div class="col-sm-10 controls select">
			{{$this->Form->input('cate_id',array('class'=>'form-control','div'=>false,'label'=>false))}}
		</div>
	</div> -->
	
	{{$this->Swfupload->load('qrcode',array('modelClass'=>'Wx','label'=>'公众号二维码','isadmin'=>false,'no_db'=>1,'upload_limit'=>1))}}
	
	<!-- {{$this->Swfupload->load('coverimg',array('modelClass'=>'Wx','label'=>'公众号封面图片','isadmin'=>false,'no_db'=>1,'upload_limit'=>1))}} -->
	<!-- {{$this->Swfupload->load('banner',array('modelClass'=>'Wx','label'=>'Banner图片','isadmin'=>false,'upload_limit'=>5))}} -->
	
	<!-- <div class="form-group">
		<label class="col-sm-2 control-label" for="WxIsCompany" >是否多人协作</label>
		<div class="col-sm-10 controls select">
			{{$this->Form->input('is_company',array('type'=>'checkbox','div'=>false,'label'=>false))}}
			<p><small>勾选多人协作时，若账号加入了某个公司，则公司其它成员可以协作管理该公众号。如使用135小程序回复留言等。</small></p>
		</div>
	</div> -->

	<div class="form-group">
		<label class="col-sm-2 control-label" for="WxAutoReplies" >开启回复消息</label>
		<div class="col-sm-10 controls select">
			{{$this->Form->input('auto_replies',array('type'=>'checkbox','div'=>false,'label'=>false))}}
			<p style="color:red;">开启后，自动回复消息才能生效。</p>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label" for="WxAutoReplies" >联合自动回复</label>
		<div class="col-sm-10 controls select">
			{{$this->Form->input('union_auto_replies',array('type'=>'text','div'=>false,'label'=>false))}}
			<p style="color:#999;">多公众号自动回复规则合并，同时生效。输入多个公众号编号，用英文逗号隔开。授权的各公众号都需配置。</p>
		</div>
	</div>
	<hr>
	<div class="form-group">

		<label class="col-sm-2 control-label" for="WxYuanchuang" >是否开通原创</label>
		<div class="col-sm-10 controls select">
			{{$this->Form->input('yuanchuang',array('type'=>'checkbox','div'=>false,'label'=>false))}}
		</div>
	</div>
	
	<div class="form-group">
		<label class="col-sm-2 control-label" for="WxIndustry" >所属行业</label>
		<div class="col-sm-10 controls select form-inline">
			{{$this->Form->input('industry',array('type'=>'select','multiple'=> 'checkbox','div'=>false,'label'=>false))}}
		</div>
	</div>
	
	<div class="form-group form-inline">
		<label class="col-sm-2 control-label">公众号粉丝数</label>
		<div class="col-sm-10 controls">
			{{$this->Form->input('fensishu',array('class'=>'form-control','placeholder'=>'请输入粉丝数','required'=>'required','div'=>false,'label'=>false))}} 
		</div>
	</div>
	<!-- 
	{{if !$this->data['Wx']['fensishu']}}
		<div class="form-group form-inline">
			<label class="col-sm-2 control-label">公众号粉丝数</label>
			<div class="col-sm-10 controls">
				{{$this->Form->input('fensishu',array('class'=>'form-control','required'=>'required','div'=>false,'label'=>false))}} 请输入粉丝数。
				<p>粉丝数从微信获取失败，您可以尝试<a href="/wxes/pauth" >重新授权公众号</a>，以便通过微信接口获取粉丝数。</p>
			</div>
		</div>
	{{else}}
		<div class="form-group form-inline">
			<label class="col-sm-2 control-label">公众号粉丝数</label>
			<div class="col-sm-10 controls">
				<p style="line-height: 40px;color:red;">{{$this->data['Wx']['fensishu']}}</p>
			</div>
		</div>
	{{/if}} -->
		
		<div class="form-group form-inline">
			<label class="col-sm-2 control-label" for="WxLinkman" >联系人</label>
			<div class="col-sm-10 controls select">
				{{$this->Form->input('linkman',array('class'=>'form-control','required'=>'required','div'=>false,'label'=>false))}}
			</div>
		</div>
		
		<div class="form-group form-inline">
			<label class="col-sm-2 control-label"  for="WxLinkphone">手机号</label>
			<div class="col-sm-10 controls select">
				{{$this->Form->input('linkphone',array('class'=>'form-control','type'=>'number','required'=>'required','div'=>false,'label'=>false))}}
			</div>
		</div>
		<div class="form-group form-inline">
			<label class="col-sm-2 control-label"  for="WxLinkwechat">个人微信号</label>
			<div class="col-sm-10 controls select">
				{{$this->Form->input('linkwechat',array('class'=>'form-control','type'=>'text','required'=>'required','div'=>false,'label'=>false))}}
			</div>
		</div>
		<hr>
		<div class="form-group">
			<label class="col-sm-2 control-label" for="WxOnsale" >是否出售公众号</label>
			<div class="col-sm-10 controls select">
				{{$this->Form->input('onsale',array('type'=>'checkbox','div'=>false,'label'=>false))}}
				
				&nbsp;&nbsp;<small style="color:#bbb;">客户有意向收购您公众号时，我们将与您联系</small>
			</div>
		</div>
		<div class="form-group form-inline">
			<label class="col-sm-2 control-label" for="WxSalePrice" >意向出售价格</label>
			<div class="col-sm-10 controls select">
				{{$this->Form->input('sale_price',array('class'=>'form-control','div'=>false,'label'=>false))}} 元
			</div>
		</div>
		<hr>
		<div class="form-group">
			<label class="col-sm-2 control-label" for="WxAdFlag" >是否接受广告</label>
			<div class="col-sm-10 controls select">
				{{$this->Form->input('ad_flag',array('type'=>'checkbox','div'=>false,'label'=>false))}}
				&nbsp;&nbsp;<small style="color:#bbb;">客户有意向向您公众号投广告时，我们将与您联系</small>
			</div>
		</div>
		<div class="form-group form-inline">
			<label class="col-sm-2 control-label" for="WxFirstPrice" >头条广告报价</label>
			<div class="col-sm-10 controls select">
				{{$this->Form->input('first_price',array('class'=>'form-control','div'=>false,'label'=>false))}} 元
			</div>
		</div>
		<hr>
	
	
	<div class="form-group">
		<label class="col-sm-2 control-label" for="WxSummary">描述</label>
		<div class="col-sm-10">
			{{$this->Form->input('summary',array('class'=>'form-control','div'=>false,'maxlength'=>500,'label'=>false,'type'=>'textarea'))}}
			<p><small style="color:#bbb;">描述请注明您公众号所属的行业，推送内容的分类。粉丝数，主要面向哪些类型的粉丝群体。请尽量详细介绍出您公众号的特征与优势。</small></p>
			<p><small style="color:#bbb;">提示：您编辑的公众号资料仅在135生效，不会对微信有影响。</small></p>
		</div>
	</div>
	
	
	
	<div class="form-group">
		<label class="col-sm-2 control-label" for="WxName"></label>
		<div class="col-sm-10"><input class="btn btn-primary" type="submit" value="提交"></div>
	</div>
{{$this->Form->end()}}

{{$this->Html->script(array(
	//'ckeditor/ckeditor.js',
	'swfupload/swfupload.js',
	'swfupload/swfupload.queue.js',
	'swfupload/swfupload.cookies.js',
	'swfupload/fileprogress.js',
	'swfupload/handlers.js',
))}}
<script>
$(function(){
	/*CKEDITOR.editorConfig = function( config ){
		config.toolbar = 'FRONT';
	}
	ckeditors['WxContent'] = CKEDITOR.replace( 'WxContent',
		    {
		        customConfig : '{{$this->Html->url("/js/ckeditor/front-config.js")}}'
		    });
	ckeditors['WxContent'].on('focus',function(e){
		current_ckeditor_instance = e.editor;
	});
	

	CKEDITOR.on( 'instanceReady', function( e ){
		e.editor.document.appendStyleSheet( '{{$this->Html->url("/stylevars/getcss.css")}}' );
		e.editor.document.appendStyleSheet( '{{$this->Html->url("/css/ui-customer.css")}}' );
		//e.editor.setMode( 'source' );
		e.editor.on( 'mode', function( e ){
			if(e.editor.mode == 'wysiwyg'){
				e.editor.document.appendStyleSheet( '{{$this->Html->url("/stylevars/getcss.css")}}' );
				e.editor.document.appendStyleSheet( '{{$this->Html->url("/css/ui-customer.css")}}' );
			}
		});
	});*/
})
</script>